﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:OMANE_Modules_TauxGarantis_ViewModels="clr-namespace:OMANE.Modules.TauxGarantis.ViewModels" 
    xmlns:igCA="http://infragistics.com/Chart"    
    xmlns:local="clr-namespace:OMANE.Modules.TauxGarantis"
	mc:Ignorable="d"
	x:Class="Views.ViewSensibilites"
	x:Name="UserControl"
	d:DesignWidth="640" d:DesignHeight="480">

    <UserControl.DataContext>
        <OMANE_Modules_TauxGarantis_ViewModels:ViewModelSensibilites/>
    </UserControl.DataContext>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="0.5*"/>
            <RowDefinition Height="0.5*"/>
            <RowDefinition/>

        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style TargetType="ToolTip">
                <Setter Property="Background" Value="White" />
                <Setter Property="BorderBrush" Value="#FF9F50F1" />
                <Setter Property="BorderThickness" Value="2" />
                <Setter Property="FontWeight" Value="Bold" />
                <Setter Property="FontSize" Value="14" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ToolTip">
                            <Border Padding="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5" >
                                <ContentPresenter ContentSource="Content" />
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style TargetType="{x:Type igCA:DataPoint}">
                <Setter Property="ToolTip">
                    <Setter.Value>
                        <Binding Path="Y">
                            <Binding.Converter>
                                <local:SPConverter />
                            </Binding.Converter>
                        </Binding>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        <TextBlock Text="Tests de sensibilité  autour du scenario central" HorizontalAlignment="Center" FontSize="26.667" FontWeight="Bold" TextWrapping="Wrap" TextAlignment="Center" Grid.ColumnSpan="2"  />
        <Border BorderBrush="#FF9F50F1" BorderThickness="3" Grid.Row="1" CornerRadius="10" Grid.Column="1" Grid.RowSpan="2" Margin="5" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <igCA:XamChart Grid.Column="1" EndPaletteBrush="Red" StartPaletteBrush="Red">
                    <igCA:XamChart.Axes>
                        <igCA:Axis AxisType="PrimaryY">
                            <igCA:Axis.Label>
                                <igCA:Label Format="{}{0:P0}" />
                            </igCA:Axis.Label>
                        </igCA:Axis>
                    </igCA:XamChart.Axes>
                    <igCA:XamChart.Legend>
                        <igCA:Legend Visible="False" />
                    </igCA:XamChart.Legend>
                    <igCA:XamChart.Caption>
                        <igCA:Caption Text="Evolution S/P en fonction du taux garanti"/>
                    </igCA:XamChart.Caption>
                    <igCA:XamChart.Series>
                        <igCA:Series DataSource="{Binding EvolutionSPTauxGaranti}" ChartType="Scatter" DataMapping="ValueX=X;ValueY=Y">
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                        <igCA:Series DataSource="{Binding EvolutionSPTauxGaranti}" ChartType="ScatterLine" DataMapping="ValueX=X;ValueY=Y" StrokeThickness="2">
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                    </igCA:XamChart.Series>
                </igCA:XamChart>
                <TextBlock Grid.ColumnSpan="2" Grid.Row="1" TextAlignment="Center" Text="Choc en nombre de points sur le taux garanti" />
                <TextBlock TextAlignment="Center" Text="Esperance du S/P" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5"  >
					<TextBlock.LayoutTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-90"/>
							<TranslateTransform/>
						</TransformGroup>
					</TextBlock.LayoutTransform>
                </TextBlock>
            </Grid>
        </Border>
        <Border BorderBrush="#FF9F50F1" BorderThickness="3" Grid.Row="3" CornerRadius="10" Grid.Column="1" Grid.RowSpan="2" Margin="5" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <igCA:XamChart Grid.Column="1" EndPaletteBrush="Green" StartPaletteBrush="Green">
                    <igCA:XamChart.Axes>
                        <igCA:Axis AxisType="PrimaryY">
                            <igCA:Axis.Label>
                                <igCA:Label Format="{}{0:P0}" />
                            </igCA:Axis.Label>
                        </igCA:Axis>
                    </igCA:XamChart.Axes>
                    <igCA:XamChart.Legend>
                        <igCA:Legend Visible="False"/>
                    </igCA:XamChart.Legend>
                    <igCA:XamChart.Caption>
                        <igCA:Caption Text="Evolution S/P en fonction des frais de gestion"/>
                    </igCA:XamChart.Caption>
                    <igCA:XamChart.Series>
                        <igCA:Series DataSource="{Binding EvolutionSPFraisGestion}" ChartType="Scatter" DataMapping="ValueX=X;ValueY=Y">
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                        <igCA:Series DataSource="{Binding EvolutionSPFraisGestion}" ChartType="ScatterLine" DataMapping="ValueX=X;ValueY=Y" StrokeThickness="2">
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                    </igCA:XamChart.Series>
                </igCA:XamChart>
                <TextBlock Grid.ColumnSpan="2" Grid.Row="1" TextAlignment="Center" Text="Choc en nobre de points sur les frais de gestions" />
                <TextBlock TextAlignment="Center" Text="Esperance du S/P" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5"  >
					<TextBlock.LayoutTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-90"/>
							<TranslateTransform/>
						</TransformGroup>
					</TextBlock.LayoutTransform>
                </TextBlock>
            </Grid>
        </Border>
        <Border BorderBrush="#FF9F50F1" BorderThickness="3" Grid.Row="1" CornerRadius="10" Margin="5" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <igCA:XamChart Grid.Column="1" EndPaletteBrush="Blue" StartPaletteBrush="Blue">
                    <igCA:XamChart.Axes>
                        <igCA:Axis AxisType="PrimaryY">
                            <igCA:Axis.Label>
                                <igCA:Label Format="{}{0:P0}" />
                            </igCA:Axis.Label>
                        </igCA:Axis>
                    </igCA:XamChart.Axes>
                    <igCA:XamChart.Legend>
                        <igCA:Legend Visible="False" />
                    </igCA:XamChart.Legend>
                    <igCA:XamChart.Caption>
                        <igCA:Caption Text="Choc sur le taux technique"/>
                    </igCA:XamChart.Caption>

                    <igCA:XamChart.Series>
                        <igCA:Series   
							ChartType="Scatter" 
							DataSource="{Binding ChocTauxTechnique}" 
							DataMapping="ValueX=X;ValueY=Y">
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                        <igCA:Series   
							ChartType="ScatterLine" StrokeThickness="2"
							DataSource="{Binding ChocTauxTechnique}" 
							DataMapping="ValueX=X;ValueY=Y">
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                    </igCA:XamChart.Series>
                </igCA:XamChart>
                <TextBlock TextAlignment="Center"  Grid.ColumnSpan="2" Grid.Row="1" Text="Choc en nombre de points par rapport au scenario central" />
                <TextBlock TextAlignment="Center" Text="Esperance du S/P" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5"    >
					<TextBlock.LayoutTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-90"/>
							<TranslateTransform/>
						</TransformGroup>
					</TextBlock.LayoutTransform>
                </TextBlock>
            </Grid>
        </Border>
        <Border BorderBrush="#FF9F50F1" BorderThickness="3" Grid.Row="2" CornerRadius="10" Grid.RowSpan="2" Margin="5" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <igCA:XamChart Grid.Column="1" EndPaletteBrush="Purple" StartPaletteBrush="Purple">
                    <igCA:XamChart.Axes>
                        <igCA:Axis AxisType="PrimaryY">
                            <igCA:Axis.Label>
                                <igCA:Label Format="{}{0:P0}" />
                            </igCA:Axis.Label>
                        </igCA:Axis>
                    </igCA:XamChart.Axes>
                    <igCA:XamChart.Legend>
                        <igCA:Legend Visible="False"/>
                    </igCA:XamChart.Legend>
                    <igCA:XamChart.Caption>
                        <igCA:Caption Text="Choc sur les durées initiales"/>
                    </igCA:XamChart.Caption>
                    <igCA:XamChart.Series>
                        <igCA:Series DataSource="{Binding ChocDureesInitiales}" ChartType="Scatter" DataMapping="ValueX=X;ValueY=Y">
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                        <igCA:Series DataSource="{Binding ChocDureesInitiales}" ChartType="ScatterLine" DataMapping="ValueX=X;ValueY=Y" StrokeThickness="2">
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                    </igCA:XamChart.Series>
                </igCA:XamChart>
                <TextBlock Grid.ColumnSpan="2" Grid.Row="1" Text="Choc en nombre de mois" TextAlignment="Center" />
                <TextBlock TextAlignment="Center" Text="Esperance du S/P" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5"    >
					<TextBlock.LayoutTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-90"/>
							<TranslateTransform/>
						</TransformGroup>
					</TextBlock.LayoutTransform>
                </TextBlock>
            </Grid>
        </Border>
        <Border BorderBrush="#FF9F50F1" BorderThickness="3" Grid.Row="4" CornerRadius="10" Margin="5" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <igCA:XamChart Grid.Column="1" EndPaletteBrush="#FFE6BE02" >
                    <igCA:XamChart.Axes>
                        <igCA:Axis AxisType="PrimaryY">
                            <igCA:Axis.Label>
                                <igCA:Label Format="{}{0:P0}" />
                            </igCA:Axis.Label>
                        </igCA:Axis>
                    </igCA:XamChart.Axes>
                    <igCA:XamChart.Legend>
                        <igCA:Legend Visible="False"/>
                    </igCA:XamChart.Legend>
                    <igCA:XamChart.Caption>
                        <igCA:Caption Text="Choc sur les taux nominaux"/>
                    </igCA:XamChart.Caption>
                    <igCA:XamChart.Series>
                        <igCA:Series DataSource="{Binding ChocTauxNominaux}" ChartType="Scatter" DataMapping="ValueX=X;ValueY=Y" >
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                        <igCA:Series DataSource="{Binding ChocTauxNominaux}" ChartType="ScatterLine" DataMapping="ValueX=X;ValueY=Y" StrokeThickness="2" >
                            <igCA:Series.Animation>
                                <igCA:Animation/>
                            </igCA:Series.Animation>
                        </igCA:Series>
                    </igCA:XamChart.Series>
                </igCA:XamChart>
                <TextBlock Grid.ColumnSpan="2" Grid.Row="1" Text="Choc en nombre de points par rapport au scenario" TextAlignment="Center" />
                <TextBlock TextAlignment="Center" Text="Esperance du S/P" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5"    >
					<TextBlock.LayoutTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-90"/>
							<TranslateTransform/>
						</TransformGroup>
					</TextBlock.LayoutTransform>
                </TextBlock>
            </Grid>
        </Border>
    </Grid>
</UserControl>